<?php
	session_start();

	include("mysql_connect.php");
	
//	$_SESSION['PropertyId'] = $_POST['arg'];

//	$strKeyWord = $_SESSION['AgentID'];

	$strSqlCommand = 'SELECT Address
					  FROM REOffice
					  WHERE idREOffice = '. $_SESSION['OfficeID'];

	$result = mysql_query($strSqlCommand);
	$rowDetail = @mysql_fetch_array($result);	

//	$strAddress = $rowDetail[0]. ' '.$rowDetail[1] . ' ' . $rowDetail[2] . ' ' . $rowDetail[3];
	$_SESSION["MapAddress"] = 'https://maps.googleapis.com/maps/api/staticmap?center=' . str_replace( " ","+", $rowDetail['Address']). 
								'&amp;zoom=14&amp;size=288x400&amp;markers='.str_replace( " ","+", $rowDetail['Address']).'&amp;sensor=false';

	echo '<img src="'.$_SESSION["MapAddress"].'" sytle="width: 100%; height: auto;"/>';	

?>